<h1>创建博客</h1>

<div class="row">
  <div class="col-sm-5">
    <%= form_for @blog, url: blogs_path, method: :post do |f| %>
      <div class="form-group">
        <ul class="list-unstyled">
          <% @blog.errors.messages.values.flatten.each do |error| %>
            <li><i class="fa fa-exclamation-circle"></i> <%= error %></li>
          <% end -%>
        </ul>
      </div>

      <div class="form-group">
        <%= f.text_field :title, class: "form-control", placeholder: "标题" %>
      </div>

      <div class="form-group">
        <%= f.text_area :content, class: "form-control", placeholder: "内容" %>
      </div>

      <%= f.submit "保存", class: "btn btn-primary" %> 
    <% end -%>
  </div>

  <div class="col-sm-7">
  </div>
</div>